	<div class="panel panel-primary">
		<div class="panel-heading">
			<h3 class="panel-title">Kontak</h3>
		</div>
		<div class="panel-body table-responsive">
		<?php

		if ($kontak_array !== false)
		{
			// generate table

			echo "<div class='text-center'>";
			echo $halaman;
			echo "</div>";

			$tmpl = array ( 'table_open'  => '<table border="0" cellpadding="2" cellspacing="1" class="table table-striped table-condensed">' );

			$this->table->set_template($tmpl); 

			$this->table->set_heading('#', 'Nama', 'Nomor','Keterangan', 'Grup', 'Aksi');

			$i=$mulai+1;
			foreach ($kontak_array as $kontak){

				// konversi grup_id -> grup_nama + span
				$kontak_grup_id = $kontak->get_anggota();
				$kontak_grup_nama = array();
				foreach ($kontak_grup_id as $grup_id)
					$kontak_grup_nama[] = '<span class="label label-info">' . $grup_array[$grup_id]->get_nama() .'</span>';

				$this->table->add_row($i++, $kontak->get_nama(), $kontak->get_nomor(), $kontak->get_keterangan(), implode('&nbsp;',$kontak_grup_nama), "<a class='btn btn-warning' href='".site_url("kontak/ubah/".$kontak->get_id())."'>Ubah</a>&nbsp;<a class='btn btn-danger' href='".site_url("kontak/hapus/".$kontak->get_id())."'>Hapus</a>");
			}

			echo $this->table->generate();
		}
		else
		{
			echo $this->lang->line('error_nggak_ketemu');
		}
		?>
		</div>
	</div>